<template>
  <div class="my-page">
    <div class="myhead">
      <div class="myinfo">
        <img
          class="mybg"
          src="http://liufusong.top:8080/img/profile/bg.png"
          alt="背景图"
        />
        <div class="myinfo-con">
          <div class="myicon">
            <img
              class="icon-img"
              src="http://liufusong.top:8080/img/profile/avatar.png"
              alt="icon"
            />
          </div>

          <div class="myinfo-name">游客</div>

          <button class="myinfo-btn" @click="$router.push('/login')">
            去登录
          </button>
        </div>
      </div>
    </div>
    <van-grid :column-num="3" :border="false">
      <van-grid-item icon="star-o" text="我的收藏" to="/login" />
      <van-grid-item icon="wap-home-o" text="我的出租" to="/login" />
      <van-grid-item icon="underway-o" text="看房记录" to="/login" />
      <van-grid-item icon="label-o" text="成为房主" to="/login" />
      <van-grid-item icon="user-circle-o" text="个人资料" to="/login" />
      <van-grid-item icon="service-o" text="联系我们" />
    </van-grid>
    <div class="ad">
      <img src="http://liufusong.top:8080/img/profile/join.png" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'user-page',
  data() {
    return {}
  }
}
</script>

<style scoped lang="less">
.myinfo {
  min-height: 300px;
  position: relative;
}
.mybg {
  width: 100%;
}
.myinfo-con {
  position: absolute;
  background: #fff;
  width: 85%;
  height: 55%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px 3px #ddd;
  margin: 50px auto 0;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
}
.myicon {
  position: relative;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  border: 5px solid #f5f5f5;
  display: inline-block;
  box-shadow: 0 2px 2px #bdbdbd;
  .icon-img {
    width: 100%;
    border-radius: 50%;
  }
}
.myinfo-name {
  font-size: 13px;
  margin-top: -15px;
  color: #000;
}

.myinfo-btn {
  height: 30px;
  width: 70px;
  background-color: #21b97a;
  border-radius: 5px;
  margin-top: 18px;
  color: #fff;
  font-size: 13px;

}

.van-grid {
  .van-grid-item {
    padding: 10px 0;
    font-size: 13px;
  }
}
::v-deep .van-icon {
  font-size: 20px;
}

.ad {
  text-align: center;
  img {
    width: 92%;
  }
}
</style>
